跳到主要内容

OpenSTF 安装

Linux 基本上都可以用,快速搭建


安装环境

官方要求 https://github.com/DeviceFarmer/stf#devicefarmer-vs-openstf-faq

  • 需要Node.js 20.x 以上版本(某些依赖项不支持较新版本)

  • adb

  • RethinkDB >= 2.2

  • CMake >= 3.9(适用于node-jpeg-turbo)

  • GraphicsMagick(用于调整屏幕截图大小)

  • 已安装ZeroMQ库

  • 已安装Protocol Buffers库

  • 已安装yasm(用于编译嵌入式libjpeg-turbo)

  • pkg-config,以便 Node.js 可以找到库


安装

  • nodejs

https://nodejs.org/zh-cn/download/current

# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 20

# Verify the Node.js version:
node -v # Should print "v20.19.3".
nvm current # Should print "v20.19.3".

# Verify npm version:
npm -v # Should print "10.8.2".
  • adb
apt install adb
  • RethinkDB

https://rethinkdb.com/docs/install/ubuntu/

# Download the public key.
wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | \
sudo gpg --dearmor -o /usr/share/keyrings/rethinkdb-archive-keyrings.gpg

# Add the repository.
echo "deb [signed-by=/usr/share/keyrings/rethinkdb-archive-keyrings.gpg] https://download.rethinkdb.com/repository/ubuntu-$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list

sudo apt-get update
sudo apt-get install rethinkdb

# Check installation.
rethinkdb --version
  • CMake
apt install cmake
cmake --version
  • GraphicsMagick
apt-get install graphicsmagick